package com.tdam2011.grupo03.activitys;

import com.tdam2011.grupo03.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.net.Uri;

public class InformacionContacto extends Activity {

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.informacioncontacto);
		TextView t = (TextView) this.findViewById(R.id.txtContacto);
		EditText telefonos = (EditText) this.findViewById(R.id.txtTelefonos);
		telefonos.setEnabled(false);
		EditText emails = (EditText) this.findViewById(R.id.txtEmail);
		emails.setEnabled(false);
		ImageView photo = (ImageView) this.findViewById(R.id.ivContactPhoto);

		Bundle extras = getIntent().getExtras();

		if (extras != null) {
			t.setText(extras.getString("nombre"));
			photo.setImageURI(Uri.parse(extras.getString("foto")));
			for (String telefono : extras.getStringArrayList("telefonos")) {
				telefonos.append(telefono + "\n");
			}
			for (String mail : extras.getStringArrayList("mails")) {
				emails.append(mail + "\n");
			}
		}
	}

	@Override
	protected void onResume() {
		super.onResume();

	}

	@Override
	protected void onPause() {
		super.onPause();

	}

	@Override
	protected void onStop() {
		super.onStop();

	}
}
